home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Auge 4000
/
Auge 4000 #47 (1990-06-22)(Amiga User Gruppe Einzugsgebiet 4000).zip
/
Auge 4000 #47 (1990-06-22)(Amiga User Gruppe Einzugsgebiet 4000).adf
/
ARP-DOCS1.3
/
Ask
< prev
next >
Wrap
Text File
|
1990-06-22
|
2KB
|
67 lines
Ask(V1.3) ARP User's Manual Ask(V1.3)
NAME
Ask - Query user interactively.
SYNOPSIS
Ask Prompt WARN OK TIMEOUT
DESCRIPTION
Ask is a program that allows you to get a simple form of
input from a user. It is most useful in Execute scripts.
You may specify a Prompt string, which will be displayed to
the user, and you may also specify a string to match on for
both YES and NO responses, as well as specifying a time
limit on the users response in seconds. All of these
strings have default values, the default for the WARN string
is 'Y', the default for the OK string is 'N', and the
default for the Prompt is a single question mark.
If the user enters a string which matches the WARN string,
Ask will exit with a return code that will cause an IF WARN
statement to succeed. If the user enters a string which
matches the OK string, exceeds the value given in TIMEOUT,
or simply hits RETURN then Ask will exit with a ZERO return,
suitable for the ELSE portion of such an IF statement.
If the user enters a string other than those specified in
WARN and OK, then ASK will redisplay the prompt, urging the
user to give a better answer.
EXAMPLE
Here is an example of an Ask command which will return a
WARNING if the user types "Amiga", and an OK if the user
types "BigBlue", or waits longer than 10 seconds to respond:
Ask "Amiga or BigBlue?" "Amiga" "BigBlue" Timeout 10
IF WARN ; typed amiga!
Echo "Obviously a person of quality"
ELSE ; typed big blue? or couldn't decide
Echo "You seem to be misguided"
ENDIF
SEE ALSO
AshManual, Execute
Page 1 (printed 4/28/89)